package com.anzia.stream;

import java.io.Serializable;

/**
 *@ClassName com.anzia.stream.Student
 *@Description
 *@Author Anzia.
 *@Date 2021/4/9 14:28
 *@Version 1.0
 **/
//标记这个学生可以序列化
public class Student implements Serializable {

    private static final long serialVersionUID = 4430830299345459386L;
    private String name;
    private int age;
    public Student() {

    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "com.anzia.stream.Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

}
